const path = require('path')
module.exports = {
  productionSourceMap: false,
  devServer: {
    port: '9008',
    proxy: {
      '^/api': {
        target: 'http://192.168.0.242:8100',
        // target: 'https://manager.starday.shop',
        changeOrigin: true
      }
    }
  },
  pluginOptions: {
    'style-resources-loader': {
      preProcessor: 'scss',
      patterns: [
        path.resolve(__dirname, 'src/assets/style/_common.scss')
      ]
    }
  },
  chainWebpack: (config) => {
    config.plugin('html').tap((args) => {
      args[0].title = '单页管理系统'
      return args
    })
  }
}
